<!DOCTYPE html>
<html lang="en" data-ng-app="appModule">
<head>
	<meta charset="UTF-8">
	<title>ng directive</title>
	<script src="framework/angular.js"></script>
	<script>
		var app = angular.module("appModule", [], function () {
			console.log("init");
		});

		app.controller("mainController", [function($scope){
			console.log("controller init");
		}]);

		app.directive("myDirective", function(){
			return {
				restrict: "A",
				scope: {
					myTitle:"@"
				},
				template: "<div>{{myTitle}}</div>",
			}
		})
	</script>
</head>
<body data-ng-controller="mainController">
	<div my-directive my-title='init'>
		<span>{{myTitle}}</span>
	</div>
</body>
</html>